package org.example.service.impl;

import org.example.entity.Student;
import org.example.mapper.StudentMapper;
import org.example.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    StudentMapper studentMapper;
    @Override
    public void insert(Student s) {
        studentMapper.insert(s);
    }

    @Override
    public void update(Student s) {
        studentMapper.update(s);

    }

    @Override
    public void delete(String id) {
        studentMapper.delete(id);

    }

    @Override
    public List<Student> getAll() {
        return studentMapper.getAll();
    }

    @Override
    public Student getById(String id) {
        return studentMapper.getById(id);
    }
}
